import request from '@/utils/request'

export function classInfoImport() {
  return request({
      url: "/classInfo/excel/importTemplate",
      responseType:'blob',
      method:'get',
  })
}

// 获取班级列表信息
export function findSchoolClassPageList(data) {
    return request({
      url: 'classInfo/findSchoolClassPageList',
      method: 'post',
      data
    })
}


// 新增或修改班级信息
export function addOrUpdateSchoolClassInfo(data) {
    return request({
      url: 'classInfo/addOrUpdateSchoolClassInfo',
      method: 'post',
      data
    })
}

// 删除班级信息
export function deleteSchoolClassInfo(data) {
    return request({
      url: 'classInfo/deleteSchoolClassInfo',
      method: 'post',
      data
    })
}

//查询所有班级信息
export function findAllSchoolClass(){
  return request({
    url:'classInfo/findAllSchoolClass',
    method:'get',
  })
}

// 获取班级列表信息
export function findClassByTeacher() {
  return request({
    url: 'classInfo/findClassByTeacher',
    method: 'get',
  })
}

// 批量修改班级状态
export function batchUpdateClassStatus(data) {
  return request({
    url: 'classInfo/batchUpdateClassStatus',
    method: 'post',
    data
  })
}


export function findTeacherClassPageList(data) {
  return request({
    url: 'classInfo/findTeacherClassPageList',
    method: 'post',
    data
  })
}

export function studentListByClass(data) {
  return request({
    url: '/student/info/listByClass/'+data,
    method: 'get',
  })
}

export  function queryByStudentName(data){
 return request({
   url:"classInfo/queryByStudentName",
   method:"POST",
   params:data
 })

}

export  function addTeacherRelation(data){
  return request({
    url:"classInfo/addTeacherRelation",
    method:"POST",
    data
  })
 
 }
